package com.hxgz.steel.dao;

import com.hxgz.steel.domain.Category;
import com.hxgz.steel.dto.CategoryDto;
import com.hxgz.steel.dto.CategoryTimeDto;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.List;

@Component("CategoryMapper")
public interface CategoryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    int insertSelective(Category record);

    Category selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKey(Category record);

    List<Category> queryCategoryByParentId(Integer parentId);

    List<CategoryTimeDto> getListByParentId(@Param("parentId") Integer parentId, @Param("status") Integer status);

    List<Category> getListByFuncIdAndId(HashMap<Object, Object> map);

    List<String> getTpyeInfo(String name);

    List<CategoryDto> getPrimeType(@Param("firParentId") Integer firParentId,@Param("pageSize") Integer pageSize);

    List<CategoryDto> getChildType(@Param("id") Integer id,@Param("pageSize") Integer pageSize);

    List<CategoryDto> getTypeByType(@Param("name") String name,@Param("pageSize") Integer pageSize);

    List<CategoryDto> getPrimeName(@Param("parentId")Integer parentId);


    List<CategoryDto> selectMetrails(@Param("name") String name,@Param("id") Integer id);

    List<String> getCommodityListByCategory(@Param("name") String name,@Param("id") Integer id);
}